<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../css/reset.css">
  <style>
    .inputElm {}
  </style>
</head>

<body>
  <input type="text" class="inputElm">
  <script>
    function go(data) {
      console.log(data)
    }
    var inputElm = document.querySelector('.inputElm')
    inputElm.oninput = function () {
      var script = document.createElement('script');
      script.src = `https://sug.so.360.cn/suggest?callback=go&word=${this.value}`
      document.body.appendChild(script)
    }
  </script>
</body>

</html>